pub fn time_info(time: &str) -> String {
    let date = time.split("-").map(|c| c.parse::<u32>().unwrap()).collect::<Vec<_>>();
    let days = get_days([date[0],1,1], [date[0],date[1],date[2]]);
    let rest_days = get_days([date[0],date[1],date[2]], [date[0],12,31]);
    let mut weeks = if date[0] < 2024 {
        let diff = get_days([date[0],1,1], [2024,1,1]);
        let weeks = if (days as i32 + 1i32-(diff as i32 + 1i32) % 7 as i32) < 0 {
            1
        }else {
            let mut weeks = (days+1-(diff+1)%7).div_ceil(7);
            if (diff+1)%7 > 4 {
                weeks += 1;
            }
            weeks
        };
        weeks
    }else if date[0] == 2024 {
        (days+1).div_ceil(7)
    }else {
        let diff = get_days([2024,1,1], [date[0],1,1]);
        let weeks =  if (days as i32 + 1i32 - (7i32 - (diff as i32 + 1i32) % 7i32)) < 0 {
            1
        }else{
            let mut weeks = (days+1-(7-(diff+1)%7)).div_ceil(7);
            if (diff+1)%7 < 4 {
                weeks += 1;
            }
            weeks
        };
        weeks
    };
    if weeks == 53 {
        weeks = 1;
    }
    // let n = get_days([2010,2,14], [date[0],date[1],date[2]]);
    let n = get_days([2000,2,5], [date[0],date[1],date[2]]);

    format!("{},{},{}",weeks,rest_days,calc((n+1) as i32))
}
fn get_days(start:[u32;3],end:[u32;3]) -> u32{
    let mut months = [31,28,31,30,31,30,31,31,30,31,30,31];
    if start[0] != end[0] {
        let start_y = get_days(start, [start[0],12,31]);
        let y = (start[0]+1..end[0]).fold(0u32, |acc, x| acc + if leap_year(x) { 366 } else { 365 } );
        let end_y = get_days([end[0],1,1], end);
        return start_y + y + end_y;
    }
    if leap_year(start[0]) {
        months[1] = 29;
    }
    if start[1] == end[1] {
        return end[2] - start[2];
    }
    let mut days = months[(start[1]-1) as usize] - (start[2]-1);
    days = (start[1]+1..end[1]).fold(days, |acc, x| acc + months[(x-1) as usize]);
    days += end[2]-1;
    days
}
fn leap_year(year:u32) -> bool {
    (year%4 == 0 && year%100 != 0) || year%400 == 0
}
fn calc(mut total:i32) -> i32{
    let years = [
        vec![(1,30),(2,30),(3,29),(4,29),(5,30),(6,29),(7,29),(8,30),(9,29),(10,30),(11,30),(12,29)], //2000
        vec![(1,30),(2,30),(3,29),(4,30),(4,29),(5,30),(6,29),(7,29),(8,30),(9,29),(10,30),(11,29),(12,30)], //2001
        vec![(1,30),(2,30),(3,29),(4,30),(5,29),(6,30),(7,29),(8,29),(9,30),(10,29),(11,30),(12,29)], //2002
        vec![(1,30),(2,30),(3,29),(4,30),(5,30),(6,29),(7,30),(8,29),(9,29),(10,30),(11,29),(12,30)], //2003
        vec![(1,29),(2,30),(2,29),(3,30),(4,30),(5,29),(6,30),(7,29),(8,30),(9,29),(10,30),(11,29),(12,30)], //2004
        vec![(1,29),(2,30),(3,29),(4,30),(5,29),(6,30),(7,30),(8,29),(9,30),(10,29),(11,30),(12,29)], //2005
        vec![(1,30),(2,29),(3,30),(4,29),(5,30),(6,29),(7,30),(7,29),(8,30),(9,30),(10,29),(11,30),(12,30)], //2006
        vec![(1,29),(2,29),(3,30),(4,29),(5,29),(6,30),(7,29),(8,30),(9,30),(10,30),(11,29),(12,30)], //2007
        vec![(1,30),(2,29),(3,29),(4,30),(5,29),(6,29),(7,30),(8,29),(9,30),(10,30),(11,29),(12,30)], //2008
        vec![(1,30),(2,30),(3,29),(4,29),(5,30),(5,29),(6,29),(7,30),(8,29),(9,30),(10,29),(11,30),(12,30)], //2009
        vec![(1,30),(2,29),(3,30),(4,29),(5,30),(6,29),(7,29),(8,30),(9,29),(10,30),(11,29),(12,30)], //2010
        vec![(1,30),(2,29),(3,30),(4,30),(5,29),(6,30),(7,29),(8,29),(9,30),(10,29),(11,30),(12,29)], //2011
        vec![(1,30),(2,29),(3,30),(4,30),(4,29),(5,30),(6,29),(7,30),(8,29),(9,30),(10,29),(11,30),(12,29)], //2012
        vec![(1,30),(2,29),(3,30),(4,29),(5,30),(6,30),(7,29),(8,30),(9,29),(10,30),(11,29),(12,30)], //2013
        vec![(1,29),(2,30),(3,29),(4,30),(5,29),(6,30),(7,29),(8,30),(9,30),(9,29),(10,30),(11,29),(12,30)], //2014
        vec![(1,29),(2,30),(3,29),(4,29),(5,30),(6,29),(7,30),(8,30),(9,30),(10,29),(11,30),(12,29)], //2015
        vec![(1,30),(2,29),(3,30),(4,29),(5,29),(6,30),(7,29),(8,30),(9,30),(10,29),(11,30),(12,30)], //2016
        vec![(1,29),(2,30),(3,29),(4,30),(5,29),(6,29),(6,30),(7,29),(8,30),(9,29),(10,30),(11,30),(12,30)], //2017
        vec![(1,29),(2,30),(3,29),(4,30),(5,29),(6,29),(7,30),(8,29),(9,30),(10,29),(11,30),(12,30)], //2018
        vec![(1,30),(2,29),(3,30),(4,29),(5,30),(6,29),(7,29),(8,30),(9,29),(10,29),(11,30),(12,30)], //2019
        vec![(1,29),(2,30),(3,30),(4,30),(4,29),(5,30),(6,29),(7,29),(8,30),(9,29),(10,30),(11,29),(12,30)], //2020
        vec![(1,29),(2,30),(3,30),(4,29),(5,30),(6,29),(7,30),(8,29),(9,30),(10,29),(11,30),(12,29)], //2021
        vec![(1,30),(2,29),(3,30),(4,29),(5,30),(6,30),(7,29),(8,30),(9,29),(10,30),(11,29),(12,30)], //2022
        vec![(1,29),(2,30),(2,29),(3,29),(4,30),(5,30),(6,29),(7,30),(8,30),(9,29),(10,30),(11,29),(12,30)], //2023
        vec![(1,29),(2,30),(3,29),(4,29),(5,30),(6,29),(7,30),(8,30),(9,29),(10,30),(11,30),(12,29)], //2024
        vec![(1,30),(2,29),(3,30),(4,29),(5,29),(6,30),(6,29),(7,30),(8,29),(9,30),(10,30),(11,30),(12,29)], //2025
        vec![(1,30),(2,29),(3,30),(4,29),(5,29),(6,30),(7,29),(8,29),(9,30),(10,30),(11,30),(12,29)], //2026
        vec![(1,30),(2,30),(3,29),(4,30),(5,29),(6,29),(7,30),(8,29),(9,29),(10,30),(11,30),(12,29)], //2027
        vec![(1,30),(2,30),(3,30),(4,29),(5,30),(5,29),(6,29),(7,30),(8,29),(9,29),(10,30),(11,30),(12,29)], //2028
        vec![(1,30),(2,30),(3,29),(4,30),(5,29),(6,30),(7,29),(8,30),(9,29),(10,29),(11,30),(12,30)], //2029
        vec![(1,29),(2,30),(3,29),(4,30),(5,30),(6,29),(7,30),(8,29),(9,30),(10,29),(11,30),(12,29)], //2030
    ];
    let mut year_idx = 0;
    let mut month_idx = 0;
    while total>0 {
        let month = years[year_idx].clone();
        let all_days = month.iter().map(|m| m.1 as i32).sum::<i32>();
        if all_days <= total {
            total -= all_days;
            year_idx += 1;
        }else {
            if total > month[month_idx].1.try_into().unwrap() {
                total -= month[month_idx].1 as i32;
                month_idx += 1;
            }else{
                break;
            }
        }
    }
    let month = years[year_idx].clone();
    let mut rest = years[year_idx].iter().skip(month_idx+1).fold(0, |acc,x| acc + x.1);
    rest += month[month_idx].1 - total;
    rest-1
}
